﻿@model ChangePasswordModel
@using SmartStore.Web.Models.Customer;
@{
    Layout = "~/Views/Shared/_ColumnsTwo.cshtml";

    //title
    Html.AddTitleParts(T("PageTitle.Account").Text);
}
@section left
{
    @Html.Partial("MyAccountNavigation", Model.NavigationModel, new ViewDataDictionary())
}
@*codehint: sm-edit*@
@using (Html.BeginForm("ChangePassword", "Customer", FormMethod.Post, new { @class = "form-horizontal" }))
{
    @Html.AntiForgeryToken()
    <div class="page account-page change-password-page">

        <h4 class="muted">@T("Account.MyAccount")</h4>
        <div class="page-title">
            <h1>@T("Account.ChangePassword")</h1>
        </div>

        <div class="page-body">
            @if (!ViewData.ModelState.IsValid) {
                @Html.ValidationSummary(true)
            }
            @if (!String.IsNullOrEmpty(Model.Result))
            {
                <div class="alert alert-info">
                    @Model.Result
                </div>
            }

            <div class="control-group" style="margin-top: 30px">
                @Html.LabelFor(model => model.OldPassword, new { @class="control-label required" , @for="OldPassword" } )
                <div class="controls">
                    @Html.EditorFor(model => model.OldPassword)
                    @Html.ValidationMessageFor(model => model.OldPassword)
                </div>
            </div>
            <div class="control-group" style="margin-top: 40px">
                @Html.LabelFor(model => model.NewPassword, new { @class="control-label required" , @for="NewPassword" } )
                <div class="controls">
                    @Html.EditorFor(model => model.NewPassword)
                    @Html.ValidationMessageFor(model => model.NewPassword)
                </div>
            </div>
            <div class="control-group">
                @Html.LabelFor(model => model.ConfirmNewPassword, new { @class="control-label required" , @for="ConfirmNewPassword" } )
                <div class="controls">
                    @Html.EditorFor(model => model.ConfirmNewPassword)
                    @Html.ValidationMessageFor(model => model.ConfirmNewPassword)
                </div>
            </div>
            <div class="control-group">
                <div class="controls">
                    <button type="submit" class="btn btn-primary">@T("Account.ChangePassword.Button")</button>
                </div>    
            </div>
        </div>
    </div>
}